package com.jimmy.medical.entity;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import javax.persistence.*;

/**
 * 
 * @Description:会员
 *
 * @author jimmy
 *
 * @version 1.0
 */
@Entity
@Table(name = "member")
public class Member extends AbstractEntity {
	/** 用户名*/
	@Column(name = "username", length = 20)
	private String username;
	/** 昵称*/
	@Column(name = "nickname", length = 50)
	private String nickname;
	/** 会员号*/
	@Column(name = "member_no", length = 50)
	private String memberNo;
	/**  真实姓名*/
	@Column(name = "realname", length = 50)
	private String realname;
	/**  真实姓名拼音*/
	@Column(name = "realname_py", length = 50)
	private String realnamePy;
	/**  登录密码*/
	@Column(name = "passwd", length = 20)
	private String password; 
	/**  性别*/
	@Column(name = "sex", length = 2)
	private String sex; 
	/**  生日*/
	@Column(name = "birthdate", length = 20)
	private String birthdate;
	/**  民族*/
	@Column(name = "nation", length = 20)
	private String nation;
	/**  籍贯省*/
	@Column(name = "origin_province", length = 20)
	private String originProvince;
	/**  籍贯市*/
	@Column(name = "origin_city", length = 20)
	private String originCity;
	/**  居住地省*/
	@Column(name = "address_province", length = 20)
	private String addressProvince;
	/**  居住地市*/
	@Column(name = "address_city", length = 20)
	private String addressCity;
	/**  居住地详细地址*/
	@Column(name = "address", length = 50)
	private String address;
	/**  婚姻状况*/
	@Column(name = "marry", length = 10)
	private String marry;
	/**  子女*/
	@Column(name = "children", length = 10)
	private String children;
	/**  文化程度*/
	@Column(name = "degree", length = 10)
	private String degree;
	/**  信仰*/
	@Column(name = "faith", length = 50)
	private String faith;
	/**  血型*/
	@Column(name = "blood_type", length = 10)
	private String bloodType;
	/**  身份证号*/
	@Column(name = "id_card", length = 18)
	private String idCard; 
	/**  邮箱*/
	@Column(name = "email", length = 100)
	private String email; 
	/**  固定电话*/
	@Column(name = "office_phone", length = 100)
	private String officePhone;
	/**  移动电话*/
	@Column(name = "mobile", length = 100)
	private String mobile; 
	/**  qq*/
	@Column(name = "qq", length = 50)
	private String qq; 
	/**  用户登录IP地址*/
	@Column(name = "ip", length = 15)
	private String ip;
	/**  是否启用*/
	@Column(name = "is_enabled", length = 2)
	private String isEnabled = "Y";
	/**  职业*/
	@Column(name = "job", length = 50)
	private String job;
	/**  工作单位*/
	@Column(name = "company", length = 50)
	private String company;
	/**  工作强度*/
	@Column(name = "work_strength", length = 50)
	private String workStrength;
	/**  会员标识，用于给会员打标签，例如老赖账，性格好等，有咨询医生自行标注*/
	@Column(name = "identification", length = 50)
	private String identification;
	/**  居住区域*/
	@Column(name = "living_area", length = 50)
	private String livingArea;
	/**  医保*/
	@Column(name = "ensurance", length = 50)
	private String ensurance;
	/** 创建用户*/
	@Column(name = "create_user", length = 50)
	private String createUser;
	/** 创建时间*/
	@Column(name = "create_time", length = 20)
	private String createTime;
	/** 是否已体检*/
	@Column(name = "is_health_check", length = 1)
	private String isHealthCheck;
	/** 更新用户*/
	@Column(name = "update_user", length = 50)
	private String updateUser;
	/** 更新时间*/
	@Column(name = "update_time", length = 20)
	private String updateTime;
	/** 入会时间*/
	@Column(name = "begin_time", length = 20)
	private String beginTime;
	/** 到期时间*/
	@Column(name = "expire_time", length = 20)
	private String expireTime;
	/** 咨询医生*/
	@ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "user_id")
    @NotFound(action = NotFoundAction.IGNORE)
	private User user;
	/** 会员类型*/
	@ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "member_type_id")
    @NotFound(action = NotFoundAction.IGNORE)
	private MemberType memberType;
	/** 紧急联系人姓名1*/
	@Column(name = "emergency_name1", length = 50)
	private String emergencyName1;
	/** 紧急联系人姓名2*/
	@Column(name = "emergency_name2", length = 50)
	private String emergencyName2;
	/** 紧急联系人关系1*/
	@Column(name = "emergency_relation1", length = 10)
	private String emergencyRelation1;
	/** 紧急联系人关系2*/
	@Column(name = "emergency_relation2", length = 10)
	private String emergencyRelation2;
	/** 紧急联系人电话1*/
	@Column(name = "emergency_mobile1", length = 20)
	private String emergencyMobile1;
	/** 紧急联系人电话2*/
	@Column(name = "emergency_mobile2", length = 20)
	private String emergencyMobile2;

	/** 既往现病史*/
	@Column(name = "health_history", length = 500)
	private String healthHistory;
	/** 家族史*/
	@Column(name = "famliy_history", length = 500)
	private String famliyHistory;
	/** 个人史*/
	@Column(name = "personal_history", length = 500)
	private String personalHistory;
	/** 健康调查总结*/
	@Column(name = "summary", length = 500)
	private String summary;
	/** 备注*/
	@Column(name = "remarks", length = 500)
	private String remarks;
	/** 头像*/
	@ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "photo_id")
    @NotFound(action = NotFoundAction.IGNORE)
	private UploadFile photo;
	
	/** 国籍*/
	@Column(name = "country", length = 100)
	private String country;
	
	/** RH血型*/
	@Column(name = "rh_blood_type", length = 10)
	private String rhBloodType;
	
	/** 是否死亡*/
	@Column(name = "is_dead", length = 2)
	private String isDead;
	
	/** 死亡时间*/
	@Column(name = "dead_time", length = 20)
	private String deadTime;
	
	/** 退休时间*/
	@Column(name = "retire_time", length = 20)
	private String retireTime;
	
	/** 参加工作时间*/
	@Column(name = "take_work_time", length = 20)
	private String takeWorkTime;

	/**
	 * 设备id（查看是否关联血压计）
	 */
	@Column(name="equipmentId")
	private String equipmentId;

	/**
	 * openid
	 */
	@Column(name="openid")
	private String openid ;//微信openid

	/** 宜*/
	@Column(name = "shoulds", length = 500)
	private String shoulds;
	
	/** 忌*/
	@Column(name = "avoids", length = 500)
	private String avoids;

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getMemberNo() {
		return memberNo;
	}

	public void setMemberNo(String memberNo) {
		this.memberNo = memberNo;
	}

	public String getRealname() {
		return realname;
	}

	public void setRealname(String realname) {
		this.realname = realname;
	}

	public String getRealnamePy() {
		return realnamePy;
	}

	public void setRealnamePy(String realnamePy) {
		this.realnamePy = realnamePy;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getBirthdate() {
		return birthdate;
	}

	public void setBirthdate(String birthdate) {
		this.birthdate = birthdate;
	}

	public String getNation() {
		return nation;
	}

	public void setNation(String nation) {
		this.nation = nation;
	}

	public String getOriginProvince() {
		return originProvince;
	}

	public void setOriginProvince(String originProvince) {
		this.originProvince = originProvince;
	}

	public String getOriginCity() {
		return originCity;
	}

	public void setOriginCity(String originCity) {
		this.originCity = originCity;
	}

	public String getAddressProvince() {
		return addressProvince;
	}

	public void setAddressProvince(String addressProvince) {
		this.addressProvince = addressProvince;
	}

	public String getAddressCity() {
		return addressCity;
	}

	public void setAddressCity(String addressCity) {
		this.addressCity = addressCity;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getMarry() {
		return marry;
	}

	public void setMarry(String marry) {
		this.marry = marry;
	}

	public String getChildren() {
		return children;
	}

	public void setChildren(String children) {
		this.children = children;
	}

	public String getDegree() {
		return degree;
	}

	public void setDegree(String degree) {
		this.degree = degree;
	}

	public String getFaith() {
		return faith;
	}

	public void setFaith(String faith) {
		this.faith = faith;
	}

	public String getBloodType() {
		return bloodType;
	}

	public void setBloodType(String bloodType) {
		this.bloodType = bloodType;
	}

	public String getIdCard() {
		return idCard;
	}

	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getOfficePhone() {
		return officePhone;
	}

	public void setOfficePhone(String officePhone) {
		this.officePhone = officePhone;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getQq() {
		return qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getIsEnabled() {
		return isEnabled;
	}

	public void setIsEnabled(String isEnabled) {
		this.isEnabled = isEnabled;
	}

	public String getJob() {
		return job;
	}

	public void setJob(String job) {
		this.job = job;
	}

	public String getCompany() {
		return company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public String getWorkStrength() {
		return workStrength;
	}

	public void setWorkStrength(String workStrength) {
		this.workStrength = workStrength;
	}

	public String getIdentification() {
		return identification;
	}

	public void setIdentification(String identification) {
		this.identification = identification;
	}

	public String getLivingArea() {
		return livingArea;
	}

	public void setLivingArea(String livingArea) {
		this.livingArea = livingArea;
	}

	public String getEnsurance() {
		return ensurance;
	}

	public void setEnsurance(String ensurance) {
		this.ensurance = ensurance;
	}

	public String getCreateUser() {
		return createUser;
	}

	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public String getIsHealthCheck() {
		return isHealthCheck;
	}

	public void setIsHealthCheck(String isHealthCheck) {
		this.isHealthCheck = isHealthCheck;
	}

	public String getUpdateUser() {
		return updateUser;
	}

	public void setUpdateUser(String updateUser) {
		this.updateUser = updateUser;
	}

	public String getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}

	public String getBeginTime() {
		return beginTime;
	}

	public void setBeginTime(String beginTime) {
		this.beginTime = beginTime;
	}

	public String getExpireTime() {
		return expireTime;
	}

	public void setExpireTime(String expireTime) {
		this.expireTime = expireTime;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public MemberType getMemberType() {
		return memberType;
	}

	public void setMemberType(MemberType memberType) {
		this.memberType = memberType;
	}

	public String getEmergencyName1() {
		return emergencyName1;
	}

	public void setEmergencyName1(String emergencyName1) {
		this.emergencyName1 = emergencyName1;
	}

	public String getEmergencyName2() {
		return emergencyName2;
	}

	public void setEmergencyName2(String emergencyName2) {
		this.emergencyName2 = emergencyName2;
	}

	public String getEmergencyRelation1() {
		return emergencyRelation1;
	}

	public void setEmergencyRelation1(String emergencyRelation1) {
		this.emergencyRelation1 = emergencyRelation1;
	}

	public String getEmergencyRelation2() {
		return emergencyRelation2;
	}

	public void setEmergencyRelation2(String emergencyRelation2) {
		this.emergencyRelation2 = emergencyRelation2;
	}

	public String getEmergencyMobile1() {
		return emergencyMobile1;
	}

	public void setEmergencyMobile1(String emergencyMobile1) {
		this.emergencyMobile1 = emergencyMobile1;
	}

	public String getEmergencyMobile2() {
		return emergencyMobile2;
	}

	public void setEmergencyMobile2(String emergencyMobile2) {
		this.emergencyMobile2 = emergencyMobile2;
	}

	public String getHealthHistory() {
		return healthHistory;
	}

	public void setHealthHistory(String healthHistory) {
		this.healthHistory = healthHistory;
	}

	public String getFamliyHistory() {
		return famliyHistory;
	}

	public void setFamliyHistory(String famliyHistory) {
		this.famliyHistory = famliyHistory;
	}

	public String getPersonalHistory() {
		return personalHistory;
	}

	public void setPersonalHistory(String personalHistory) {
		this.personalHistory = personalHistory;
	}

	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public UploadFile getPhoto() {
		return photo;
	}

	public void setPhoto(UploadFile photo) {
		this.photo = photo;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getRhBloodType() {
		return rhBloodType;
	}

	public void setRhBloodType(String rhBloodType) {
		this.rhBloodType = rhBloodType;
	}

	public String getIsDead() {
		return isDead;
	}

	public void setIsDead(String isDead) {
		this.isDead = isDead;
	}

	public String getDeadTime() {
		return deadTime;
	}

	public void setDeadTime(String deadTime) {
		this.deadTime = deadTime;
	}

	public String getRetireTime() {
		return retireTime;
	}

	public void setRetireTime(String retireTime) {
		this.retireTime = retireTime;
	}

	public String getTakeWorkTime() {
		return takeWorkTime;
	}

	public void setTakeWorkTime(String takeWorkTime) {
		this.takeWorkTime = takeWorkTime;
	}

	public String getEquipmentId() {
		return equipmentId;
	}

	public void setEquipmentId(String equipmentId) {
		this.equipmentId = equipmentId;
	}

	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}

	public String getShoulds() {
		return shoulds;
	}

	public void setShoulds(String shoulds) {
		this.shoulds = shoulds;
	}

	public String getAvoids() {
		return avoids;
	}

	public void setAvoids(String avoids) {
		this.avoids = avoids;
	}
}
